<%@page language="java" contentType="text/html;charset=UTF-8" %>
<%@include file="../common/IncludeTop.jsp"%>  
<%@page import = "dao.*,domain.*" %>
<%
String ItemID = request.getParameter("itemid");
Item item = new ItemDao().getItem(ItemID);
Inventory inventory = new InventoryDao().getInventory(ItemID);
Product product = new ProductDao().getProduct(item.getProductid());
request.setAttribute("item", item);
request.setAttribute("inventory", inventory);
request.setAttribute("product", product);
%>
<!DOCTYPE html>
<html>
  <head>
    <title>Item.html</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">    
    <link rel="stylesheet" type="text/css" href="../css/jpetstore.css">
  </head> 
  <body>
  <div id="BackLink">
   <a href="product.jsp">返回上一页</a>
  </div>
  <div id="Catalog">
  <center>
    <table>
      <tr><td>${product.descn }</td></tr>
      <tr><td><b>${item.itemid }</b></td></tr>
      <tr><td><b><font size="4">${item.attr1}</font></b></td></tr>
      <tr><td>${product.name}</td></tr>
      <tr><td>${inventory.qty}</td></tr>
      <tr><td>${item.listprice}</td></tr>
      <tr><td><a class="Button" href="Buy.jsp">添加到购物车</a></td></tr>  
    </center>
    </table>
 </div>
  </body>
</html>
<%@include file="../common/IncludeBottom.jsp"%>

